import request from '@/utils/request'

const baseUrl = import.meta.env.VITE_APP_BASE_GGYH
// 模型分页查询
export function getModelList(params) {
  return request({
    method: 'get',
    url: baseUrl + '/diagnose/recordPage',
    params
  })
}

// 根据卫星代号、参数代号、模型类型获取模型列表
export function getModelSpinner(params) {
  return request({
    method: 'post',
    data: params,
    url: baseUrl + '/diagnose/getModel'
  })
}

// 根据卫星代号获取参数列表
export function getParamSpinner(satelliteId, keyword) {
  return request({
    method: 'get',
    url: baseUrl + `/satellite/screenParam/${satelliteId}?keyword=${keyword}`
  })
}

// 获取遥测数据
export function getTelemetry(params) {
  return request({
    method: 'post',
    data: params,
    url: baseUrl + '/diagnose/getTelemetry',
    loading: true
  })
}

// 获取准确度测试数据
export function getModelAccuracy(params) {
  return request({
    method: 'post',
    data: params,
    url: baseUrl + '/diagnose/getModelAccuracy'
  })
}

// 查询参数在预处理中的信息
export function getProcessParam(params) {
  return request({
    method: 'post',
    data: params,
    url: baseUrl + '/diagnose/preprocess/param'
  })
}
